<!DOCTYPE html>
<html>
<head>
  <title>RequireJS Test</title>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="../../src/PNotifyBrightTheme.css">
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.js"></script>
  <script type="text/javascript" src="../../lib/umd/PNotify.js"></script>
  <script type="text/javascript" src="../../lib/umd/PNotifyConfirm.js"></script>
</head>
<body>
  <div style="padding: 50vh 0; text-align: center;">
    <button id="button1">Test PNotify with RequireJS</button><br>
    <button id="button2">PNotify Module with RequireJS</button>
  </div>
  <script type="text/javascript">
    /* globals requirejs */
    document.getElementById('button1').addEventListener('click', function () {
      requirejs(['PNotify'], function (PNotify) {
        PNotify.notice({
          title: 'Yay!',
          text: 'It works!'
        });
      });
    });
    document.getElementById('button2').addEventListener('click', function () {
      requirejs(['PNotify', 'PNotifyConfirm'], function (PNotify) {
        PNotify.notice({
          title: 'Yay!',
          text: 'It works!',
          modules: {
            Confirm: {
              confirm: true
            }
          }
        });
      });
    });
  </script>
</body>
</html>
